<?php
/*
Engineer: Derek Shue
Secondary: Sean Margison
Updated: 12/5/2011
Description: Browse courses, displays course name, department, course number and term.
*/
 ?>

<h3>Your current courses:</h3>
<dl>
<?php
$this->form->setAction($this->url());
echo $this->form;
?>
</dl>

<table>
	<tr> <th> Course </th> <th> Department </th><th> Course Number </th> <th> Term </th></tr>
	<?php if($this->entries):?>
	<?php foreach ($this->entries as $entry): ?>
	<tr>
	    <td align="center"><a href="
	    	<?php echo $this->url(array('controller'=>'common','action'=>'viewcoursedetails','cid'=>$this->escape($entry->CID)));?>">
	    	<?php echo $this->escape($entry->COURSENAME);?></a></td>
	    <td align="center"><?php echo $this->escape($entry->DEPARTMENT);?></td>
		<td align="center"><?php echo $this->escape($entry->COURSENUMBER);?></td>
		<td align="center"><?php echo $this->escape($entry->TERM);?></td>
	</tr>
    <?php endforeach ?>
    <?php endif?>
    <?php if(!$this->entries):?>
    <tr>
	    <td align="center" colspan="4"> No courses available for the current term.</td>
	</tr>
	<?php endif?>
</table>


